﻿@model ESMAM.Model.SYS.sys_user

@{
    Layout = "~/Views/Shared/_Root.cshtml";

    var dictLeiXing = new Dictionary<int, string>();
    dictLeiXing.Add(0, "超级用户");
    dictLeiXing.Add(1, "管理用户");
    dictLeiXing.Add(2, "代理用户");
    dictLeiXing.Add(3, "个人用户");
}

<!--顶部-->
@section top{
    <ul class="nav navbar-nav navbar-right">
        <li class="datetime"><a><span id="bjui-date">0000/00/00</span> <span id="bjui-clock">00:00:00</span></a></li>
        <li><a  href="/User/Edit" data-toggle="dialog" data-id="sys_user_changepass" data-maxable="false" data-mask="true" data-title="@Html.CurLang("个人信息")" data-width="650" data-height="320">@Html.CurLang("登录名")：@Model.loginname</a></li>
        <li><a href="#" id="aYongHLX">@Html.CurLang("用户类型")：@dictLeiXing[Model.role]</a></li>
        <li class="dropdown">
            <a id="changelang" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true">
                @Html.CurLangText()
                <span class="caret"></span>
            </a>
            <ul class="dropdown-menu" aria-labelledby="changelang">
                <li><a href="javascript:;" lg="en">English</a></li>
                <li><a href="javascript:;" lg="zh">简体中文</a></li>
                @*<li><a href="javascript:;" lg="kor">한국어</a></li>
                <li><a href="javascript:;" lg="jp">日本語</a></li>*@
                <li><a href="javascript:;" lg="spa">Español</a></li>
            </ul>
        </li>
        <li><a href="/User/ChangePwd" data-toggle="dialog" data-id="sys_user_changepass" data-maxable="false" data-mask="true" data-width="400" data-height="280">@Html.CurLang("修改密码")</a></li>
        <li><a href="/Login/Logout" style="font-weight:bold;">&nbsp;<i class="fa fa-power-off"></i>@Html.CurLang("注销登陆")</a></li>
        <li class="dropdown">
            <a href="#" class="dropdown-toggle bjui-fonts-tit" data-toggle="dropdown" title="@Html.CurLang("更改字号")"><i class="fa fa-font"></i> @Html.CurLang("中")</a>
            <ul class="dropdown-menu" role="menu" id="bjui-fonts">
                <li><a href="javascript:;" class="bjui-font-a" data-toggle="fonts"><i class="fa fa-font"></i> @Html.CurLang("特大")</a></li>
                <li><a href="javascript:;" class="bjui-font-b" data-toggle="fonts"><i class="fa fa-font"></i> @Html.CurLang("大")</a></li>
                <li><a href="javascript:;" class="bjui-font-c" data-toggle="fonts"><i class="fa fa-font"></i> @Html.CurLang("中")</a></li>
                <li><a href="javascript:;" class="bjui-font-d" data-toggle="fonts"><i class="fa fa-font"></i> @Html.CurLang("小")</a></li>
            </ul>
        </li>
        @*<li class="dropdown active open"><a href="#" class="dropdown-toggle theme" data-toggle="dropdown" title="切换皮肤" aria-expanded="true"><i class="fa fa-tree"></i></a>
            <ul class="dropdown-menu" role="menu" id="bjui-themes" style="">                          
                <li class=""><a href="javascript:;" class="theme_purple" data-toggle="theme" data-theme="purple">&nbsp;<i class="fa fa-tree"></i> 紫罗兰</a></li>
                <li class="default theme blue"><a href="javascript:;" class="theme_blue" data-toggle="theme" data-theme="blue">&nbsp;<i class="fa fa-tree"></i> 天空蓝</a></li>
                <li class="active"><a href="javascript:;" class="theme_green" data-toggle="theme" data-theme="green">&nbsp;<i class="fa fa-tree"></i> 绿草如茵</a></li>
            </ul>
        </li>*@
        @*<li><a href="javascript:;" onclick="bjui_index_exchange()" title="横向收缩/充满屏幕"><i class="fa fa-exchange"></i></a></li>*@

    </ul>
}
<!--菜单-->
@section menu{
    <ul class="nav navbar-nav navbar-right" id="bjui-hnav-navbar">
    </ul>
}

<!---默认主页展示的内容-->
@section pageContent{
    <div class="highlight">
        <pre class="prettyprint">
XXXX公告：
------------------------
1.xxxxxxxxxxxxxxxxxxxxxx。
2.yyyyyyyyyyyyyyyyyyyyyyyyy。
------------------------

　　　　　　2018-xx-xx by.Try
         </pre>
    </div>
}


@section loadScript{
    <script type="text/javascript">
        $(function () {
            var txt = $("#aYongHLX").text().trim().replace('@Html.CurLang("用户类型")：', '');
            $("#aYongHLX").html('@Html.CurLang("用户类型")：' + transLang(txt));
        });
        $("#changelang").next().find("li a").click(function () {            
            $("#changelang").html($(this).text() + "<span class=\"caret\"></span>");
            var lg = $(this).attr("lg");            
            $.ajax({
                url: "/Lang/SetLang",
                type:"GET",
                data: { "lg": lg },
                dataType: "json",
                async: false,
                cache: false,
                success: function (res) {
                    if (res.Code == 1) {
                        window.location.reload();
                    } else {
                        BJUI.alertmsg('error', transLang("设置语言出错！"));
                    }
                },
                error: function (xhr, status, errorThrown) {
                    BJUI.alertmsg('error', xhr.statusText);
                }
            });
        });
    </script>
}
